﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Common.Utils;
using Common.ViewModels;
using Common.ViewModels.Messages;

namespace PlatingLineUI.UserControls
{
    /// <summary>
    /// DeviceMoveControl.xaml 的交互逻辑
    /// </summary>
    public partial class DeviceMoveControl : UserControl
    {
        public DeviceMoveControl()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 鼠标按下
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DeviceMoveControl_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            
        }

        private void DeviceMoveControl_OnPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
        }

        private void _stationMouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                e.Handled = true;
                if (sender is FrameworkElement frameworkElement)
                {
                    ProductLine.Instance.SelectValue = frameworkElement.DataContext;
                    //MessageAggregator<SelectMsg>.Publish(new SelectMsg()
                    //{

                    //});
                }
                //var obj = (sender as FrameworkElement).DataContext;
            }
            catch (Exception exception)
            {
               
            }
        }
    }
}
